<script setup lang="ts">
	import { ref } from 'vue';

	const emits = defineEmits(['end', 'time'])

	const countdownRef = ref()

	const end = () => {
		emits('end')
	}

	const time = (seconds : number) => {
		emits('time', seconds)
	}

	defineExpose({
		reset(seconds : number) {
			console.log(seconds)
			countdownRef.value.reset(seconds)
		}
	})
</script>

<template>
	<tui-countdown v-bind="$attrs" @end="end" @time="time" ref="countdownRef"></tui-countdown>
</template>

<style>
</style>